/*
 * Copyright 2009-2010 Belmont Software Services
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.belmont.backup;

/*
  Backing up a directory:
  - create Manifest of source directory
  - send Manifest to destination
  - destination extracts all the digests from the Manifest and
    calculates the set of files that are needed. If any file was
    partially uploaded then it calculates the offset for that file.
  - destination sends back the set of full and partial files needed to
    complete the backup operation.
  - source sends the required content to the destination. During this
    phase, any fatal errors in sending the content result in the
    backup operation being aborted. This means the destination still
    has the files and partial files that were uploaded but it doesn't
    commit the backup operation. When the operation is retried it will
    restart from where it left off because the destination only
    requires the files a that were not succesfully uploaded.
  - Destination verifies that the digest of each uploaded file matches
    the value in the Manifest.
  - Once all the content has succesfully been received by the
    destination then that Manifest is committed as a succesful backup.

  Restoring a directory:
  - Destination replies with all of the commited Manifests available
    for that source.
  - The source selects one of them (usually the latest one). 
  - The source rescans the restore directory to see which files are
    already in the directory. 
  - The source then requests any full or partial files from the backup
    server.
  - The backup server sends the required content to the source
    and the source verifies the digest of the downloaded content.

  Differencing:
  - Optionally either the source or destination can created byte-level
    diff files for each file. If such files are available then they
    can be used in combination with the destination file to recreate
    the desired version of the file.
 */
public class Main {
    public static void main(String args[]) {
    }
}

